<html>
 <head>
	<title>[var.TITLE]</title>
	<link href="[var.ROOT_CSS_DIR]/main.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">
	<link href="[var.ROOT_CSS_DIR]/facet/style.css" rel="STYLESHEET" type="text/css" charset="iso-8859-1" hreflang="en-us">	
	<script type="text/javascript" src="[var.ROOT_DIR]js/common.js"></script>	
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsformgrid.php?session=[var.SessionVar]"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsmasks.js"></script>
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsverify.php?session=[var.SessionVar]"></script>	
	<script type="text/javascript" src="[var.ROOT_DIR]js/jsinit.php?session=[var.SessionVar]"></script>	
 </head>
<body bgcolor="FFFFFF" topmargin="0" leftmargin="0" bottommargin="0" marginheight="0" marginwidth="0">
<iframe id="CLoader" style="display:none;"></iframe>
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
	    <tr>
	      <td>
	 <!-- GRID SECTION -->
			<table border="0" width="100%" cellpadding="3" cellspacing="1" class="FacetFormTABLE" align="left">
			<form method=post name="[var.HTMLGridForm]" onsubmit="TransferData();self.close();">
			  <tr>
			    <td nowrap class="FacetColumnTD" align="center">Item</td>
			  	<td nowrap class="FacetColumnTD" align="center">Quantity</td>
			  	<td nowrap class="FacetColumnTD" align="center">X</td>
			    <td nowrap class="FacetColumnTD" align="center">Tarif</td>
			    <td nowrap class="FacetColumnTD" align="center">=</td>
			    <td nowrap class="FacetColumnTD" align="center">Total</td>
			  </tr>
			  <tr>
			    <td class="FacetDataTD">
				<input type="text" name="item" value="" maxlength="255" size="30" class="input" onchange="this.value=this.value.toUpperCase()">
			    </td>
			    <td class="FacetDataTD" align="center">
			    <input type="text" name="qty" value="1" maxlength="255" size="4" class="inputNumber" onkeyup="GetTarif();">
			    </td>
			    <td class="FacetDataTD" align="center">X</td>
			    <td class="FacetDataTD" align="center">
				<input type="text" name="tarif" value="0" maxlength="255" size="10" class="inputNumber" onkeyup="GetTarif();">
			    </td>
			    <td class="FacetDataTD" align="center">=</td>
			    <td class="FacetDataTD" align="center">
			    <input type="text" name="total" value="0" maxlength="255" size="20" class="inputNumber" readonly>
			    </td>
			  </tr>
			  <tr>
			    <td nowrap class="FacetColumnTD" align="right" colspan="6">
					<table border="0" cellspacing="2" cellpadding="0">
						<tr>
					   		<td>
					   		<input name="FormAction" type="button" value="Ok" class="button" onclick="TransferData();self.close();">
					   		</td>							   		
					   		<td>
					   		<input name="FormAction" type="button" value="Cancel" class="button" onclick="self.close();">
					   		</td>
						</tr>
					</table>			    
			    </td>
			  </tr>			  
		    </form>
			</table>
	<!-- GRID SECTION -->
	       </td>						      
	 	</tr>
	</table>
</body>
<script>
[var.InitFunction]

function GetTarif(val) {
	 oMask = new Mask('#,###.##0', 'number');
	 var inc_ppn = [var.IncludePPN];
	 if (inc_ppn)
   document.[var.HTMLGridForm].total.value = oMask.format(StrToNumber(document.[var.HTMLGridForm].tarif.value)*document.[var.HTMLGridForm].qty.value*100/110); 
	 else
	 document.[var.HTMLGridForm].total.value = oMask.format(StrToNumber(document.[var.HTMLGridForm].tarif.value)*document.[var.HTMLGridForm].qty.value);
}

function TransferData () {
 window.opener.document.[var.FormName].[var.FormDesc].value  = document.[var.HTMLGridForm].item.value;
 window.opener.document.[var.FormName].[var.FormTotal].value = document.[var.HTMLGridForm].total.value;
 window.opener.GetTotal ();
}
</script>
</html>
